package com.stu.service.impl;

import com.stu.dao.StudentsMapper;
import com.stu.service.StudentsService;
import com.stu.tools.MyTools;
import com.stu.vo.ExcelData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentsServiceImpl implements StudentsService {
    @Autowired
    StudentsMapper mapper;

    @Override
    public List<ExcelData> studentsList() {
        List<ExcelData> list = mapper.studentsList();
        for (ExcelData s : list) {
            s.setState(MyTools.getStatus(s.getStatus()));
        }
        return list;
    }

//    @Override
//    public String studentsIdTest(Integer stuId) {
//        if (stuId == null) {
//            return null;
//        }
//        return mapper.studentsIdTest(stuId);
//    }


    @Override
    public List<Integer> stuIdList(){
        return mapper.getStuIdList();
    }
}
